<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>上下型布局方式</title>
		<style>
			.{
				margin: 0;
				padding: 0;			
			}
			/*相同的样式 可以使用并集选择器*/
			.top,
			.banner,
			.main,			
			.footer{
				width: 960px;
				text-align: center; /*文字居中对齐*/
				margin: 0 auto;	/*可以让盒子居中对齐*/
				margin-bottom: 10px;
			}
			.top{				
				height: 80px;
				background-color: pink;				
			}
			.banner{				
				height: 120px;
				background-color: purple;				
			}
			.main{				
				height: 500px;
				background-color:hotpink ;				
			}
			.footer{				
				height: 50px;
				background-color:black ;				
			}
		</style>
	</head>
	<body>
		<div class="top">top</div>
		<div class="banner">banner</div>
		<div class="main">main</div>
		<div class="footer">footer</div>
		
	</body>
</html>
